/* Styles pour le corps de la page */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: #121212;
    color: #ffffff;
	overflow: hidden; /* Evite scroll global */
}

/* Barre de navigation */
#top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #791cf8;
    padding: 10px 20px;
}

#logo {
    font-size: 24px;
    font-weight: bold;
}

#logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

#search-bar {
    width: 40%;
    padding: 5px;
}

#profile {
    display: flex;
    align-items: center;
}

#profile-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* Espace central */
#main-content {
    display: flex;
    height: calc(100vh - 120px); /* Ajuste la hauteur */
}

#current-music-info {
    width: 25%;
    background: #333;
    padding: 0px;
    overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	position: relative;
}

#album-cover {
    width: 100%;
    border-radius: 10px;
	margin: 10;
}

#main-music-title, #main-music-artist {
    margin: 0;
    padding: 10px;
    color: white;
}

/* Logo qui spin */
#logo-spinner-container {
    position: absolute;
    bottom: 40px; /* hauteur de la barre */
    left: 0;
    right: 0;
    top: auto;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    pointer-events: none;
    overflow: hidden;
    z-index: 1; /* Derrière la barre */
}

#logo-spinner {
    max-height: 200px; /* taille maximale */
    width: auto;
    opacity: 0.05; /* très discret */
    animation: spin 8s linear infinite;
    transform-origin: center;
    transition: opacity 0.5s ease;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}


/* Barre défilante de prochaine musique */
#next-music-banner {
    height: 40px;
    background-color: #111;
    border-top: 1px solid #444;
    overflow: hidden;
    display: flex;
    align-items: center;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding-left: 10px;
	z-index: 2;
}

#scrolling-text {
    white-space: nowrap;
    padding-left: 100%;
    display: inline-block;
    animation: scroll-text 17s linear infinite;
    color: #ccc;
    font-size: 14px;
	font-family:Times New Roman;
}

#scrolling-text:hover {
    animation-play-state: paused;
}

@keyframes scroll-text {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-100%);
    }
}


/* Section principale */
#center-section {
    width: 75%;
    background: #222;
    padding: 20px;
    overflow-y: auto;
}

#center-section::-webkit-scrollbar-thumb {
    background: #ffffff; /* Couleur du pouce */
    border-radius: 4px; /* Arrondi */
}

#center-section::-webkit-scrollbar {
    width: 10px; /* Largeur de la barre de défilement */
}

#center-section::-webkit-scrollbar-thumb:hover {
    background: #b3b3b3; /* Couleur au survol */
}

/* Barre de lecture */
#player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #282828;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
	z-index: 5;
	box-sizing: border-box;
}

/* Style général de la barre de progression */
#progress-bar {
    width: 400px; /* Longueur de la barre */
    height: 8px; /* Hauteur de la barre */
    border-radius: 5px; /* Coins arrondis */
    outline: none; /* Supprime les contours */
    -webkit-appearance: none;
    appearance: none;
    overflow: visible;
    background: linear-gradient(to right, #621bc1 0%, #e0e0e0 0%); /* Fond initial */
}

/* Style de la piste de la barre de progression */
#progress-bar::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    background: transparent; /* Fond transparent pour la piste */
}

/* Style de la poignée de la barre de progression */
#progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #791cf8; /* Couleur de la poignée */
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.5s ease;
    margin-top: -6px; /* Alignement vertical du curseur */
}

/* Effet de survol sur la poignée */
#progress-bar::-webkit-slider-thumb:hover {
    transform: scale(1.08);
    background: #621bc1; /* Couleur de la poignée lors du survol */
}


#play-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

#play-pause {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}


.timestamp {
    font-size: 16px;
    color: #791cf8;
}

#music-info {
    display: flex;
    align-items: center;
}

#player-cover {
    width: 50px;
    height: 50px;
    border-radius: 5px;
}

#player-details {
    display: flex;
    flex-direction: column; /* Aligne les éléments verticalement */
    margin-left: 10px; /* Gardez le même espacement si nécessaire */
}

#player-controls, #player-options {
    display: flex;
    align-items: center;
}

#queue-btn {
    margin-left: 5px; /* Petit espace avec le bouton précédent */
}

#queue-btn.active {
    background-color: #621bc1;
    color: white;
}

button {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

input[type="range"] {
    margin: 0 10px;
}


/* Transition fluide pour les fenêtres */

.view {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  position: absolute; /* si tu veux empiler au même endroit */
  top: 0; left: 0; right: 0; bottom: 0;
  background: inherit; /* pour avoir le fond de la page */
  overflow-y: auto;
}

.view.active {
  opacity: 1;
  pointer-events: auto;
  position: relative; /* ou fixed si tu veux */
}


/* Conteneur principal des listes */
#music-lists {
    display: flex;
    flex-direction: column; /* Affiche les listes verticalement */
    gap: 20px; /* Espacement entre les listes */
    margin: 20px;
}

/* Chaque liste */
.music-list {
    display: flex;
    flex-direction: column; /* Titre au-dessus, musiques en dessous */
    gap: 10px; /* Espacement entre le titre et les musiques */
}

/* Titre de chaque liste */
.list-title {
	display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 10px 0;
    color: #ffffff;
	padding: 0 10px;
}

.buttons {
    display: flex;
    gap: 10px; /* Espacement entre les boutons */
}

.list-buttons {
    display: flex;
    gap: 10px;
}

.play-all-btn, .shuffle-btn {
    font-size: 14px;
    background-color: #333;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}

.play-all-btn:hover {
    background-color: #555;
}
.shuffle-btn:hover {
    background-color: #555;
}

.play-all-btn.active, .shuffle-btn.active {
    background-color: #EDB71C;
    color: white;
    font-weight: bold;
}

/* Conteneur des musiques dans chaque liste */
.music-items-container {
    display: flex; /* Affiche les musiques horizontalement */
    gap: 15px; /* Espacement entre les musiques */
    overflow-x: auto; /* Barre de défilement horizontale si nécessaire */
    padding-bottom: 10px; /* Espace pour éviter le recouvrement par la barre */
    background-color: #1e1e1e;
	box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
}

/* Style pour les éléments de la musique */
.music-item {
    display: flex;
    flex-direction: column;
	background-color: #0e0e0e;
    align-items: center;
	padding: 10px;
    border-radius: 10px;
	cursor: pointer;
	width: 250px;
    min-width: 250px;
}

.music-item:hover {
    transform: scale(1.05);
	transition: transform 0.2s ease-in-out;
}

.music-cover {
    width: 200px;
    height: 200px;
    border-radius: 10px;
	object-fit: cover;
}

.music-title, .music-artist {
    margin: 10px 0;
	text-align: center;
}

.music-title {
    font-size: 24px;
    font-weight: bold;
}

.music-artist {
    font-size: 18px;
    color: #b3b3b3;
}

/* Styles pour cacher les vues */
.hidden {
    display: none;
}


/* Volume */
#volume-control {
    -webkit-appearance: none;
    width: 150px;
    height: 6px;
    background: #555;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
    transition: background 0.3s;
}

#volume-control::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #EDB71C;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 2px rgba(0,0,0,0.5);
}

#volume-control::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #EDB71C;
    cursor: pointer;
    border: none;
}


/* Vue des paroles */
#lyrics-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 92%;
	width: 96%;
    background: linear-gradient(45deg, #6a11cb, #2575fc); /* Dégradé */
    color: #fff;
    padding: 20px;
    text-align: center;
	overflow: hidden; /* Empêche tout débordement inattendu */
}

#lyrics-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
	flex-shrink: 0;
}

#lyrics-text {
    font-size: 18px;
    white-space: pre-wrap; /* Garde les retours à la ligne */
    line-height: 1.5;
}

/* Bouton activé */
#lyrics-btn.active {
    background-color: #621bc1;
    color: white;
}

#lyrics-content {
    max-height: 100%; /* Ajuste la hauteur en fonction de son conteneur */
    overflow-y: auto; /* Ajoute une barre de défilement verticale si nécessaire */
    padding: 10px; /* Un peu d'espace autour des paroles */
    background: linear-gradient(to bottom, #6a11cb, #2575fc); /* Dégradé */
    color: white; /* Couleur du texte */
    border-radius: 10px; /* Bords arrondis pour un style soigné */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Légère ombre */
}

#lyrics-content::-webkit-scrollbar {
    width: 10px; /* Largeur de la barre de défilement */
}

#lyrics-content::-webkit-scrollbar-thumb {
    background: #ffffff; /* Couleur du pouce */
    border-radius: 4px; /* Arrondi */
}

#lyrics-content::-webkit-scrollbar-thumb:hover {
    background: #b3b3b3; /* Couleur au survol */
}

#lyrics-content::-webkit-scrollbar-track {
    background: #444; /* Couleur de l’arrière-plan */
}

#queue-view {
    background: #222;
}

#queue-view h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 28px;
    font-weight: bold;
}

#queueList {
    list-style: none;
    padding-left: 0;
    max-height: 100%;
    overflow-y: auto;
}

#queueList li {
    padding: 10px;
    border-bottom: 1px solid #444;
    font-size: 18px;
}

#queueList li.current-track {
    font-weight: bold;
    background-color: rgba(98, 27, 193, 0.3);
    border-radius: 5px;
    padding: 5px 10px;
}